package com.cx.common.util;

/**
 * @author flysand
 * @package com.cx.common.util
 * @date 2021-11-07 19:32
 * @des CodeUtils:验证码
 */
public class CodeUtils {

    /**
     * 获取4位随机数
     *
     * @return
     */
    public static String getVerifyCode() {
        return RandomUtils.getRandomNum4();
    }


    public enum CodeType {


        USER_VERIFY("UV");

        private String serviceCode;

        CodeType() {

        }

        CodeType(String serviceCode) {
            this.serviceCode = serviceCode;
        }

        public String getServiceCode() {
            return serviceCode;
        }

        public void setServiceCode(String serviceCode) {
            this.serviceCode = serviceCode;
        }
    }

    public enum CodeKeyType{
        CODE,
        MOBILE_COUNT
    }
}
